const myURL = new URL('https://www.example.com/foo?a=100&b=200');

console.log(myURL.searchParams.get('a'));